import http from "@/utils/request"
// 预支付订单
export let preOrder = (product_id?:string,quantity?:number) => http.post("/pay/pre_order", {
  product_id,
  quantity,
})
// 查询支付状态
export let getOrderStatus = (order_id: string) => http.get("/order/query_order-status", {
  params: {
    order_id
  }
})
// 查询订单详情
export let getOrder = (order_id?: string) => http.post("/order/get_order", {
  order_id
})
// 删除订单
export let delOrder = (order_id:string) => http.get("/order/del_order", {
  params: {
    order_id
  }
})
// // 取消订单
// export let cancelOrder = (order_id:string) => http.get("/order/cancel", {
//   params: {
//     order_id
//   }
// })